package com.ym.medical.service.task;

import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson.JSONObject;
import com.ym.core.rabbit.AbstractDelayedTask;
import com.ym.medical.service.IInquiryOrderSV;

/**
 * 自动完成订单任务
 *
 * @author: 李涛
 * @version: 2019年09月19日 15:24
 */
public class AutoCompleteOrderTask extends AbstractDelayedTask {


	public AutoCompleteOrderTask(String describe, long delayTime, JSONObject params) {
		super(describe, delayTime, params);
	}

	@Override
	public void run() throws Exception {
		IInquiryOrderSV inquiryOrderSV = SpringUtil.getBean(IInquiryOrderSV.class);
		JSONObject params = this.getParams();
		inquiryOrderSV.autoCompleteOrder(params.getLong("orderId"), params.getLong("roomId"));
	}
}
